Skip to content

OTA-260: add duplicate manifest error check#1120

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
jottofar:ota-260-manifest-check
Jul 2, 2021
Merged

OTA-260: add duplicate manifest error check#1120
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
jottofar:ota-260-manifest-check

Conversation

@jottofar
Copy link
Copy Markdown
Contributor

@jottofar jottofar commented Jun 23, 2021

Ensure each manifest contains the Kubernetes required fields apiVersion, kind, and metadata.name. Use those fields along with the optional field metadata.namespace to uniquely identify each manifest. Generate an error for any duplicate manifests, i.e. any with the same unique id.

Version is removed from apiVersion to produce Group which is what is actually used to form the above mentioned unique id. Some resources, e.g. ConfigMap, have an apiVersion with only a version identifier, e.g. v1. In these cases the Group is set to "" as opposed to v1.

See OTA-260.

@openshift-ci openshift-ci Bot requested review from smarterclayton and sttts June 23, 2021 19:54
@openshift-ci openshift-ci Bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 23, 2021
@jottofar jottofar force-pushed the ota-260-manifest-check branch from 0222a24 to d256246 Compare June 23, 2021 20:12
Comment thread pkg/manifest/manifest.go Outdated
Comment thread pkg/manifest/manifest.go Outdated
Comment thread pkg/manifest/manifest.go
Comment thread pkg/manifest/manifest.go Outdated
Comment thread pkg/manifest/manifest.go Outdated
Comment thread pkg/manifest/manifest.go Outdated
Comment thread pkg/manifest/manifest.go Outdated
Comment thread pkg/manifest/manifest.go Outdated
Comment thread pkg/manifest/manifest_test.go Outdated
@jottofar jottofar force-pushed the ota-260-manifest-check branch 3 times, most recently from 65b16ab to fdc8b02 Compare June 24, 2021 20:12
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2021
Comment thread pkg/manifest/manifest.go Outdated
Comment thread pkg/manifest/manifest_test.go Outdated
Comment thread pkg/manifest/manifest_test.go Outdated
@jottofar jottofar force-pushed the ota-260-manifest-check branch from fdc8b02 to 4fdc09d Compare July 2, 2021 19:50
Copy link
Copy Markdown
Member

@wking wking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jul 2, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jottofar, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 3135cb6 into openshift:master Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants